<template>
  <el-row class="tac">
    <el-col style="height: 100%">
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
        router="true"
      >
       <el-menu-item index="/">
          <i class="el-icon-s-promotion"></i>
          <span slot="title">地图查询</span>
        </el-menu-item>

        <el-submenu index="1">
          <template slot="title">
            <i class="el-icon-s-data"></i>
            <span style="margin-right: 20px">水位数据管理</span>
          </template>
          <el-menu-item-group>
            <el-menu-item index="/historical">历史数据</el-menu-item>
            <el-menu-item index="/chart">数据趋势</el-menu-item>
            <el-menu-item index="/maxWl">历史最大水位</el-menu-item>
          </el-menu-item-group>
        </el-submenu>

        <el-menu-item index="/prediction">
            <i class="el-icon-s-marketing"></i>
            <span style="margin-right: 20px">水位数据预测</span>
        </el-menu-item>
        
      </el-menu>
    </el-col>
  </el-row>
</template>

<script>
// import axios from 'axios'
// import { postKeyValueRequest } from "../utils/api";

export default {
  name: "mainYe",
  data() {
    return {};
  },
  mounted() {
    
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },

    // load() {
    //   const init = new Promise((resolve, reject) => {
    //     if (window.T) {
    //       console.log("地图初始化成功");
    //       resolve(window.T);
    //       reject("error");
    //     }
    //   });
    //   init.then((T) => {
    //     this.map = new T.Map("map");
    //     this.map.centerAndZoom(new T.LngLat(116.40769, 39.89945), 12);
    //   });
    // },
  },
};
</script>

<style>
.tac {
  height: 100%;
}
.el-menu-vertical-demo {
  height: 100%;
}
</style>